﻿@model sipfe.model.dataAccess.SIPMaeSolicitud
@using Resources;
@{
    Layout = "~/Views/Shared/Layaout/general/_LayoutGeneral.cshtml";
    var claseTramite = new List<SelectListItem> { 
        new SelectListItem { Text = "BECA IPFE", Value = "2109"}
    };         
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.personaJS)" ></script> 
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.autocompleteJS)" ></script> 
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.calendarioJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.validatelJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.unobtrusiveJS)" ></script>

<script type="text/javascript">
    $(function () {
        calendarioGeneral('dIniActividad', '1');
        calendarioGeneral('dFinActividad', '1');
        //function setAutoAyudaEmpresa(nIdeEmpresa, nIdeCodPaisDoc, nIdeTipoDocum, nameCampoAuto, pURL, sw) {
        setAutoAyudaEmpresa("#nIdeEmpresa", "#nIdeCodPaisDoc", "#nIdeTipoDocum", "#vNumDocum", "#vNombres", "/AutoAyuda/ListaEmpresaAuto", "1");
        setAutoAyudaEmpresa("#nIdeEmpresa", "#nIdeCodPaisDoc", "#nIdeTipoDocum", "#vNombres", "#vNumDocum", "/AutoAyuda/ListaEmpresaAuto", "2");

        setAutoAyudaEmpresa("#nIdeInstitucion", "#nIdeCodPaisDocInst", "#nIdeTipoDocumInst", "#vNumDocumInst", "#vNombresInst", "/AutoAyuda/ListaEmpresaAuto", "1");
        setAutoAyudaEmpresa("#nIdeInstitucion", "#nIdeCodPaisDocInst", "#nIdeTipoDocumInst", "#vNombresInst", "#vNumDocumInst", "/AutoAyuda/ListaEmpresaAuto", "2");

        setAutoAyudaEmpresa("#nIdePersonSolicita", "#nIdeCodPaisDocSol", "#nIdeTipoDocumSol", "#vNumDocumSol", "#vNombresSol", "/AutoAyuda/ListaPersonaAuto", "1");
        setAutoAyudaEmpresa("#nIdePersonSolicita", "#nIdeCodPaisDocSol", "#nIdeTipoDocumSol", "#vNombresSol", "#vNumDocumSol", "/AutoAyuda/ListaPersonaAuto", "2");

        setAutoAyudaEmpresa("#sipDetVinculoPersona2_nIdePersona", "#nIdeCodPaisDocVin", "#nIdeTipoDocumVin", "#vNumDocumVin", "#vNombresVin", "/AutoAyuda/ListaPersonaAuto", "1");
        setAutoAyudaEmpresa("#sipDetVinculoPersona2_nIdePersona", "#nIdeCodPaisDocVin", "#nIdeTipoDocumVin", "#vNombresVin", "#vNumDocumVin", "/AutoAyuda/ListaPersonaAuto", "2");
        //  setAutoAyudaEmpresa("#nIdePersonSolicita", "#nIdeCodPaisDocSol", "#nIdeTipoDocumSol", "#vNombresSol", "#vNumDocumSol", "/AutoAyuda/ListaPersonaAuto", "2");
    });
    
</script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.nuevoJS)" ></script>

<center>
     @using (Html.BeginForm("AddNuevaSolcitud", "Nuevo", FormMethod.Post))
     {
    <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0" class="tituloWhite8">
        <tr>
            <td style="width:15%">&nbsp;</td>
            <td style="width:25%" align="left">Clase de Solicitud:
              @Html.DropDownList("nIdeClaseSolicitud", claseTramite)    
           @*     @Html.DropDownListFor(model =>model.nIdeClaseSolicitud, (IEnumerable<SelectListItem>)ViewBag.ClaseTramite,  "--Seleccione--", new { @class = "select8" })*@
            </td>
            <td style="width:60%" align="right">@ViewBag.TITULO</td>
        </tr>
    </table>
         <br /><br /> 
         
         <fieldset style="width: 850px;" class="fieldsetStyle1">
        <legend class="tituloBlue9">DATOS DE LA ENTIDAD FINANCIADORA</legend>
        <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td>
                        <table border="0" cellpadding="1" cellspacing="0" width="98%">
                        <tbody class="tituloCelesteN8">
                            
                            <tr align="left">
                                <td>País Emisor</td>
                                <td>Tipo documento</td>
                                <td>Número documento</td>
                                <td colspan ="3" align="left">Nombre o Razón Social de Entidad Financiadora</td>
                            </tr>
                            <tr>
                                <td>
                                    @Html.HiddenFor(model => model.nIdeEmpresa)
                                    @Html.DropDownList("nIdeCodPaisDoc", (IEnumerable<SelectListItem>)ViewBag.PaisEmisor, new { @class = "select8" })
                                </td>
                                <td>
                                    @Html.DropDownList("nIdeTipoDocum", (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--", new { @class = "select8" })
                                </td>
                                <td>
                                    @Html.TextBox("vNumDocum", null, new { style = "width:100px;", maxlength = 120 })
                                </td>
                                <td colspan ="3" align="left">
                                    @Html.TextBox("vNombres", null, new { style = "width:400px;", maxlength = 120 })
                                </td>                           
                            </tr>
                        </tbody>
                    </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </fieldset>

    
    <br /><br />
   
 @Html.ValidationSummary(false, "Los Siguientes Campos son Obligatorios:")
    <fieldset style="width: 850px;" class="fieldsetStyle1">
        <legend class="tituloBlue9">DATOS DE LA SOLICITUD</legend>
        <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td>
                        <table border="0" cellpadding="1" cellspacing="0" width="98%">
                        <tbody class="tituloCelesteN8">                            
                            <tr xalign="center">
                                <td>País Emisor</td>
                                <td>Tipo documento</td>
                                <td>Número documento</td>
                                <td colspan ="3" align="left">Razón Social de la Institución Educativa donde Cursará el Programa</td>
                                
                            </tr>
                            <tr xalign="center">
                                @Html.HiddenFor(model => model.nIdeInstitucion)
                                <td>
                                    @Html.DropDownList("nIdeCodPaisDocInst", (IEnumerable<SelectListItem>)ViewBag.PaisEmisor, new { @class = "select8" })
                                </td>
                                <td>
                                    @Html.DropDownList("nIdeTipoDocumInst", (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--", new { @class = "select8" })
                                </td>
                                <td>
                                    @Html.TextBox("vNumDocumInst", null, new { style = "width:100px;", maxlength = 120 })
                                </td>
                                <td colspan ="3" align="left">
                                    @Html.TextBox("vNombresInst", null, new { style = "width:400px;", maxlength = 120 })
                                </td>
                            </tr>
                            <tr xalign="center">
                                <td>Nivel de Estudio</td>
                                <td>Concepto</td>
                                <td>Modalidad Estudio</td>                                
                                <td align="left">Incio Actividad</td>
                                <td>Fin Actividad</td>
                                <td>Duración Actividad</td>  
                            </tr>
                            <tr>                                
                                <td>
                                    @Html.DropDownList("nIdeNivelEstudio", (IEnumerable<SelectListItem>)ViewBag.NivelEstudio, "--Seleccione--", new { @class = "select8" })
                                </td>
                                <td>
                                    @Html.DropDownList("nIdeConcepto", (IEnumerable<SelectListItem>)ViewBag.Programas, "--Seleccione--", new { @class = "select8" })
                                </td>
                                <td>
                                    @Html.DropDownList("nIdeModEstudio", (IEnumerable<SelectListItem>)ViewBag.ModalidadEstudio, "--Seleccione--", new { @class = "select8" })
                                </td>                                
                                <td align="left">
                                    @Html.TextBoxFor(model => model.dIniActividad, new { style = "width:60px;text-transform:none;", maxlength = 10, readOnly = true })
                                </td>
                                <td>
                                    @Html.TextBoxFor(model => model.dFinActividad, new { style = "width:70px;text-transform:none;", maxlength = 10, readOnly = true })
                                </td>
                                <td>
                                    <table cellpadding="0" cellspacing="0" >
                                        <tr>
                                            <td>@Html.TextBoxFor(model => model.nAnioAct, new { style = "width:20px;", maxlength = 2 })</td>
                                            <td>Año(s)</td>
                                            <td>&nbsp;</td>
                                            <td>@Html.TextBoxFor(model => model.nMesAct, new { style = "width:20px;", maxlength = 2 })</td>
                                            <td>Mes(es)</td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </fieldset>

<br />


<fieldset style="width: 850px;" class="fieldsetStyle1">
    <legend class="tituloBlue9">DATOS DEL SOLICITANTE</legend>
    <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0" xclass="tablaDetalle1">
    <tbody class="tituloCelesteN8">
            <tr align="center">
                <td>País Emisor</td>
                <td>Tipo documento</td>
                <td>Número documento</td>
                <td>Nombre del Solicitante</td>
                <td>Editar</td>
            </tr>
            <tr align="center">
                <td>
                    @Html.HiddenFor(model => model.nIdePersonSolicita)
                    @Html.DropDownList("nIdeCodPaisDocSol", (IEnumerable<SelectListItem>)ViewBag.PaisEmisor, new { @class = "select8" })
                </td>
                <td>
                    @Html.DropDownList("nIdeTipoDocumSol", (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--", new { @class = "select8" })
                </td>
                <td>
                    @Html.TextBox("vNumDocumSol", null, new { style = "width:60px;", maxlength = 10 })
                </td>
                <td>
                    @Html.TextBox("vNombresSol", null, new { style = "width:300px;", maxlength = 120 })
                </td>
                <td><img src="@Url.Content("~/images/editar.png")" class="lupita2" alt="EDITAR USUARIO" onclick="javascript:addNuevaPersona(this,'1');" /></td>                          
            </tr>
    </tbody>
    </table>
</fieldset>
     <table border="0" cellpadding="10" cellspacing="0" style="width:72%;">
        <tr align="center">
            <td width="20%"><b>Campo Obligatorio:</b>&nbsp;<span class="asterisco">(*)</span></td>
            <td width="80%"><input type="button" value="Registrar Solicitud" onclick="javascript: addNuevaPersonaFinal(this.form);" /></td>
        </tr>
    </table>
        
        @Html.HiddenFor(model => model.nIdeDepSolicitud, new { Value = @Session["nIdeDep"] })
        @Html.HiddenFor(model => model.nTipoSolicitud, new { @Value = 1 })
        @Html.HiddenFor(model => model.nIdeEstadoSol, new { @Value = 1 })
        @Html.HiddenFor(model => model.nIdeUsuReg, new { Value = @Session["nIdeUsuario"] })
        @Html.HiddenFor(model => model.nIdeFuncionario, new { Value = @Session["nIdeFuncionario"] })
        @Html.HiddenFor(model => model.nIdeOrigenSol, new { @Value = 1 })

        @Html.HiddenFor(model => model.nIdePrioridad, new { @Value = 1 })
        @Html.HiddenFor(model => model.nIdePlazo, new { @Value = 1 })     
          
        @Html.HiddenFor(model => model.vAsunto, new { @Value = "asunto de prueba" }) 
     }        
</center>
